<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Non-volatile memory controller</title>
<link href="tabs.css" rel="stylesheet" type="text/css" />
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="alias.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="alias.js"></script>

<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>



<script type="text/javascript">
  jQuery(document).ready(function () {
    if(gref){ // Number all _img and _table classes
      gref();
    }
  });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->

<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">nRF Gazell
   &#160;<span id="projectnumber">version 0.4.2</span>
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.5 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
  initNavTree('group__nrf__nvmc.html','');
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">Non-volatile memory controller</div>  </div>
</div>
<div class="contents">
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="func-members"></a>
Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga07aef6466b9037e239680f44c1d066f5"></a><!-- doxytag: member="nrf_nvmc::nrf_nvmc_poweron" ref="ga07aef6466b9037e239680f44c1d066f5" args="(void)" -->
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__nrf__nvmc.html#ga07aef6466b9037e239680f44c1d066f5">nrf_nvmc_poweron</a> (void)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Power on NVMC peripheral. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga17ee5578d650224c6383cdb4190d6b57"></a><!-- doxytag: member="nrf_nvmc::nrf_nvmc_poweroff" ref="ga17ee5578d650224c6383cdb4190d6b57" args="(void)" -->
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__nrf__nvmc.html#ga17ee5578d650224c6383cdb4190d6b57">nrf_nvmc_poweroff</a> (void)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Power off NVMC peripheral. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__nrf__nvmc.html#ga8cf428dbb2a28a342c3b57cc07869d9d">nrf_nvmc_page_erase</a> (uint32_t address)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Erase a page in flash. This is required before writing to any address in the page.  <a href="#ga8cf428dbb2a28a342c3b57cc07869d9d"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__nrf__nvmc.html#ga008c6a4096bda07d67f33294af00ad9b">nrf_nvmc_write_byte</a> (uint32_t address, uint8_t value)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Write a single byte to flash.  <a href="#ga008c6a4096bda07d67f33294af00ad9b"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__nrf__nvmc.html#ga1347c44095f9486554be7c3d62737925">nrf_nvmc_write_word</a> (uint32_t address, uint32_t value)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Write a 32-bit word to flash.  <a href="#ga1347c44095f9486554be7c3d62737925"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__nrf__nvmc.html#ga7d566edd65fdc5655ce7be3cd17faba0">nrf_nvmc_write_bytes</a> (uint32_t address, const uint8_t *src, uint32_t num_bytes)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Write consecutive bytes to flash.  <a href="#ga7d566edd65fdc5655ce7be3cd17faba0"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__nrf__nvmc.html#ga9ac0536be3127139fb91992e1c5b46c4">nrf_nvmc_write_words</a> (uint32_t address, const uint32_t *src, uint32_t num_words)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Write consecutive words to flash.  <a href="#ga9ac0536be3127139fb91992e1c5b46c4"></a><br/></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<p>Driver for the nRF51 NVMC peripheral. </p>
<p>This driver allows writing to the non-volatile memory (NVM) regions of the nRF51. In order to write to NVM the controller must be powered on and the relevant page must be erased. </p>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="ga8cf428dbb2a28a342c3b57cc07869d9d"></a><!-- doxytag: member="nrf_nvmc.h::nrf_nvmc_page_erase" ref="ga8cf428dbb2a28a342c3b57cc07869d9d" args="(uint32_t address)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void nrf_nvmc_page_erase </td>
          <td>(</td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>address</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Erase a page in flash. This is required before writing to any address in the page. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">address</td><td>Start address of the page. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga008c6a4096bda07d67f33294af00ad9b"></a><!-- doxytag: member="nrf_nvmc.h::nrf_nvmc_write_byte" ref="ga008c6a4096bda07d67f33294af00ad9b" args="(uint32_t address, uint8_t value)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void nrf_nvmc_write_byte </td>
          <td>(</td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>address</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>value</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Write a single byte to flash. </p>
<p>The function reads the word containing the byte, and then rewrites the entire word.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">address</td><td>Address to write to. </td></tr>
    <tr><td class="paramname">value</td><td>Value to write. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga1347c44095f9486554be7c3d62737925"></a><!-- doxytag: member="nrf_nvmc.h::nrf_nvmc_write_word" ref="ga1347c44095f9486554be7c3d62737925" args="(uint32_t address, uint32_t value)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void nrf_nvmc_write_word </td>
          <td>(</td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>address</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>value</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Write a 32-bit word to flash. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">address</td><td>Address to write to. </td></tr>
    <tr><td class="paramname">value</td><td>Value to write. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga7d566edd65fdc5655ce7be3cd17faba0"></a><!-- doxytag: member="nrf_nvmc.h::nrf_nvmc_write_bytes" ref="ga7d566edd65fdc5655ce7be3cd17faba0" args="(uint32_t address, const uint8_t *src, uint32_t num_bytes)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void nrf_nvmc_write_bytes </td>
          <td>(</td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>address</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const uint8_t *&#160;</td>
          <td class="paramname"><em>src</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>num_bytes</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Write consecutive bytes to flash. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">address</td><td>Address to write to. </td></tr>
    <tr><td class="paramname">src</td><td>Pointer to data to copy from. </td></tr>
    <tr><td class="paramname">num_bytes</td><td>Number of bytes in src to write. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga9ac0536be3127139fb91992e1c5b46c4"></a><!-- doxytag: member="nrf_nvmc.h::nrf_nvmc_write_words" ref="ga9ac0536be3127139fb91992e1c5b46c4" args="(uint32_t address, const uint32_t *src, uint32_t num_words)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void nrf_nvmc_write_words </td>
          <td>(</td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>address</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const uint32_t *&#160;</td>
          <td class="paramname"><em>src</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>num_words</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Write consecutive words to flash. </p>
<p>@ </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">address</td><td>Address to write to. </td></tr>
    <tr><td class="paramname">src</td><td>Pointer to data to copy from. </td></tr>
    <tr><td class="paramname">num_words</td><td>Number of bytes in src to write. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
</div>
</div>
  <div id="nav-path" class="navpath">
    <ul>

    <li class="footer">
      Copyright &copy 2006-2011 <a href="http://www.nordicsemi.no" style="text-decoration:none">Nordic Semiconductor</a>.
      All Rights Reserved.
      <a href="disclaimer.html">Disclaimer</a>
    </li>
   </ul>
 </div>


</body>
</html>
